﻿namespace SandScript.Wrappers
{
    using System;
    using System.Collections.Generic;
    using System.IO;

    public interface IFileSystemWrapper
    {
        string GetTemporaryFolder();

        void MoveFile(string sourceFilename, string destFilename);

        void CopyFile(string sourceFilename, string destFilename, bool overwrite = true);

        void MoveDirectory(string sourceDirectory, string destDirectory);

        void SetFileAttributes(string fileName, FileAttributes attributes);

        DateTime GetCreationTime(string path);

        DateTime GetLastAccessTime(string path);

        bool FileExists(string path);

        bool DirectoryExists(string path);

        void DeleteFile(string path);

        void DeleteDirectory(string path, bool recursive);

        void CreateDirectory(string path);

        IEnumerable<string> GetDirectories(string directory);

        string[] GetFiles(string path, string searchPattern, SearchOption searchOption);

        Stream Open(string path);

        Stream Open(string path, FileMode mode, FileAccess access);

        void Save(string path, Stream stream);

        byte[] GetContent(Stream stream);

        void Save(string path, string contents);

        string GetText(string path);

        string[] GetLines(string path);

        string GetRandomFileName();

        bool TryResolvePath(string filePath, out string resolvedPath);
    }
}
